package com.qf02;

public class Ticket implements Runnable{

    private int ticket=100;

    public void run() {
        while (true){
            if (ticket<=0){
                break;
            }
            System.out.println(Thread.currentThread().getName()+" 卖了第"+ticket+"张票");
            ticket--;
        }
    }
}
